package com.seamtop.cuber.common.util;

import java.text.DecimalFormat;

/**
 * Created by zongjunfeng on 2015/9/30.
 */
public class MathUtil {

    public static void main(String [] args){
        String data = "2.5742";
        Double d = Double.parseDouble(data);
        long t = (long)(d * 10000);
        System.out.println("t:"+t);
        Double f2 = (double)t/10000;
        DecimalFormat df2 = new DecimalFormat("###.0000");
        System.out.println(df2.format(f2));
        System.out.println("t:"+t + " f2:"+f2);
    }
}
